package com.zjitc.service.impl;

import com.zjitc.dao.StuMapper;
import com.zjitc.domain.Stu;
import com.zjitc.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    private StuMapper stuMapper;
    public List<Stu> selectAll() {
        return stuMapper.selectAll();
    }

    public Stu getStudentById(int id) {
        return stuMapper.getStudentById(id);
    }

    public int updateStu(Stu stu) {
        return stuMapper.updateStu(stu);
    }

    public int delete(int id) {
        return stuMapper.delete(id);
    }

    public int insert(Stu stu) {
        return stuMapper.insert(stu);
    }

    public List<Stu> findByCondition(Stu stu) {
        return stuMapper.findByCondition(stu);
    }
}
